<template>
  <div class="hello">
    <div>Home</div>
    <div @click="queryDataList()">点击我在查询一次</div>
    <div>{{ res1 }}</div>
  </div>
</template>

<script>
  import {helloword} from '../../api/BaseRestApi'

  export default {
    name: 'Home',
    metaInfo: {
      title: 'Home | google',
      titleTemplate: '%s - by vue-meta',
      htmlAttrs: {
        lang: 'zh'
      },
      script: [{innerHTML: 'console.log("hello hello!")', type: 'text/javascript'}],
      __dangerouslyDisableSanitizers: ['script']
    },
    data() {
      return {
        res1: {}
      }
    },
    needSerialize: true,
    async created() {
      this.res1 = await this.$get(helloword, {
        brandId: '2',
        seq: '2020-03-08'
      })
    },
    methods: {
      queryDataList() {
        this.$get(helloword, {
          brandId: '2',
          seq: '2020-03-08'
        })
      }
    }
  }
</script>
